File-Find-Object Update

Shlomi Fish on 2006-07-28T21:28:44

Well, here is an update on File-Find-Object. As it turned out the has-a network was somewhat more complicated: every directory object contained a reference to the root object, and to the main directory object. And like I said each one of them is-a File-Find-Object.

After a medium amount of refactoring, what happens now is that every directory object is independant, and does not contain a link to either the main object or the directory above it. It still, however, is-a File-Find-Object, and I have yet to successfully work around it.

I recall trying to do too much refactoring at once at everytime, and failed miserably. The tests did not run from some reason. Then when I did a little refactoring each time, I was more successful. I still think it is wrong for the directory class (File-Find-Object-internal) to be is-a of the main class, but when I tried to do it the other way around I failed. I guess I'd have to find a way to refactor it bit by bit.

Next on the agenda:

  1. Converting everything to File::Spec.
  2. Adding more required features like pruning, customised sorting, etc.
  3. Normalising the functions - which should be part of the API and which should be preceded by an underscore. Add POD to everything that's part of the API.
  4. More kwalitee improvements.
  5. Integrating into File-Find-Rule and friends instead or in addition to File::Find.

Hopefully I'll get do some of it tomorrow. Too little time, too many things to do.